import fetch from "common/src/utils/fetch";

/**
 *  导出
 */
function exportExamApply(data) {
  return fetch({
    url: "/api/electionservice/fxExamApply/exportExamApply",
    method: "post",
    data
  });
}

/**
 *  重考申请导出
 */
function exportReExamApply(data) {
  return fetch({
    url: "/api/electionservice/fxExamApply/exportReExamApply",
    method: "post",
    data
  });
}

/**
 *  重考申请导出(勾选导出)
 */
function exportReSelected(data) {
  return fetch({
    url: "/api/electionservice/fxExamApply/exportReSelected",
    method: "post",
    data
  });
}

/**
 *  导出重考大补考(勾选)
 */
function exportSelectedReExamStudent(data) {
  return fetch({
    url: "/api/electionservice/examStudentManagement/exportSelectedReExamStudent",
    method: "post",
    data
  });
}

/**
 *  导出重考大补考
 */
function exportReExamStudent(data) {
  return fetch({
    url: "/api/electionservice/examStudentManagement/exportReExamStudent",
    method: "post",
    data
  });
}

/**
 *  审批通过，不通过
 */
function examinExamApply(data) {
  return fetch({
    url: "/api/electionservice/fxExamApply/examinExamApply",
    method: "post",
    data
  });
}

/**
 * 下载证明材料
 */
function downloadExamApply(data) {
  return fetch({
    url: "/api/electionservice/fxExamApply/downloadExamApply",
    method: "post",
    data
  });
}

/**
 * 循环获取key
 */
function getResultByObsKey(key) {
  return fetch({
    url: "/api/electionservice/fxExamApply/resultObs/"+ key,
    method: "get"
  });
}

/**
 * 获取key
 */
function exportStatus(key) {
  return fetch({
    url: '/api/electionservice/undergraduateExamDownload/result/' + key,
    method: 'get'
  });
}


/**
 * 代申请
 */
function delayedExamApply(data) {
  return fetch({
    url: "/api/electionservice/fxExamApply/delayedExamApply",
    method: "post",
    data:data
  });
}

/**
 * 重考代申请
 */
function delayedReExamApply(data) {
  return fetch({
    url: "/api/electionservice/fxExamApply/delayedReExamApply",
    method: "post",
    data:data
  });
}

/**
 * 根据学生过滤可申请缓考课程列表
 */
function applyCourseList(data) {
  return fetch({
    url: "/api/electionservice/common/fxExamQuery/applyCourseList",
    method: "post",
    data:data
  });
}

/**
 * 根据学生过滤可申请重考课程列表
 */
function getStudentReExamCourseListPage(data) {
  return fetch({
    url: "/api/electionservice/common/fxExamReexam/getStudentReExamCourseListPage",
    method: "post",
    data:data
  });
}


/**
 *  导出
 */
function exportExamSchedule(data) {
  return fetch({
    url: "/api/electionservice/examStudentManagement/exportExamSchedule",
    method: "post",
    data
  });
}

/**
 *  应考统计结果到处
 */
function exportReExamStudentStatistics(data) {
  return fetch({
    url: "/api/electionservice/examStudentManagement/exportReExamStudentStatistics",
    method: "post",
    data
  });
}


const pageUrl = "/api/electionservice/fxExamApply/examApplyQuery";
const pageUrlOne = "/api/electionservice/fxExamApply/examApplyQuery";
const pageUrlTwo = "/api/electionservice/examStudentManagement/studentExamSchedule";
const pageUrlThree = "/api/electionservice/examStudentManagement/examStudentQuery";
export default {
  pageUrl: pageUrl,
  pageUrlOne : pageUrlOne,
  pageUrlThree : pageUrlThree,
  exportExamApply:exportExamApply,
  exportReExamStudentStatistics : exportReExamStudentStatistics,
  exportReExamApply :exportReExamApply,
  exportReSelected :exportReSelected,
  exportSelectedReExamStudent : exportSelectedReExamStudent,
  exportReExamStudent : exportReExamStudent,
  examinExamApply:examinExamApply,
  downloadExamApply:downloadExamApply,
  getResultByObsKey:getResultByObsKey,
  delayedExamApply:delayedExamApply,
  delayedReExamApply:delayedReExamApply,
  exportExamSchedule:exportExamSchedule,
  exportStatus:exportStatus,
  applyCourseList:applyCourseList,
  pageUrlTwo:pageUrlTwo,
  getStudentReExamCourseListPage : getStudentReExamCourseListPage,
};
